//package modified_snake_game;

import javax.swing.JFrame;

@SuppressWarnings("serial")
public class Snake extends JFrame {

    public Snake(boolean custom, Settings settings) 
    {
    	int width = 320;
    	int height = 340;
    	int speed = 20;
    	int difficulty = 0;
    	
    	if(custom == true)
    	{
	    	width = settings.getWidth() ;
	    	height = settings.getHeight();
	    	speed =  settings.getSpeed();
	    	difficulty =  settings.getBackground();	// can we set difficulties?
    	}
    	
        add(new Board(width, height, speed, difficulty));
    
    	setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
        setSize(width, height);
        setLocationRelativeTo(null);
        setTitle("Snake");

        setResizable(false);
        setVisible(true);
    }
	
//	/**
//	 * New Snake game method that initializes all the variables
//	 * - adds new board, default operation on close, size of map,
//	 *   current location, title, visible, and if game is resizble.
//	 */
//	public Snake() {
//
//		add(new Board());
//
//		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//		setSize(320, 340);
//		setLocationRelativeTo(null);
//		setTitle("Modified_Snake_Game");
//
//		setResizable(false);
//		setVisible(true);
//	}
//
//	/**
//	 * Main method calling the snake game
//	 * @param args
//	 */
//	public static void main(String[] args) {
//		
//		new Snake();
//				
//		Board b = new Board();
//		
//		
//		/**
//		 * When snake inGame() == false, start a new game
//		 * ---Jordan, if you game get this to equal the "game over" screen then we can 
//		 *    get it to loop whenever the game ends, or atleast make it an option
//		 */
//		if (b.isInGame() == false) {
//			new Snake();
//		}else {
//			//new Snake();
//		}
//	}

}
